<?php

namespace common\entities\myhtsq;

use common\entities\ContractEntity;
use Yii;

/**
 * This is the model class for table "myscrm_revenue_recognition".
 *
 * @property string $recognition_id
 * @property string $revenue_id
 * @property string $contract_id
 * @property string $recognition_amount
 * @property string $this_period_confirm_total_amount
 * @property string $last_period_total_confirm_amount
 * @property string $recognition_begin
 * @property string $recognition_end
 * @property string $recognition_date
 * @property string $recognition_by
 * @property string $recognitioner_guid
 * @property string $revenue_forecast
 * @property string $created_on
 * @property string $created_by
 * @property string $modified_on
 * @property string $modified_by
 * @property integer $is_del
 */
class RevenueRecognitionEntity extends ContractEntity
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'myscrm_revenue_recognition';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['recognition_id'], 'required'],
            [['recognition_amount','this_period_confirm_total_amount','last_period_total_confirm_amount'], 'number'],
            [['created_on', 'modified_on'], 'safe'],
            [['is_del'],'integer'],
            [['is_del'],'default', 'value' => 1],
            [['recognition_id','revenue_id', 'contract_id', 'recognitioner_guid','created_by', 'modified_by'], 'string', 'max' => 36],
            [['recognition_begin','recognition_end','recognition_date','revenue_forecast','recognition_by'], 'string']
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'recognition_id' => '收入确认ID',
            'revenue_id' => '收入ID',
            'contract_id' => '合同ID',
            'recognition_amount' => '确认金额',
            'recognition_begin' => '确认开始时间',
            'recognition_end' => '确认结束时间',
            'recognition_date' => '确认日期',
            'recognition_by' => '确认人',
            'recognition_guid' => '确认人GUID',
            'revenue_forecast' => '收入预测',
            'created_on' => '创建时间',
            'created_by' => '创建人',
            'modified_on' => '修改时间',
            'modified_by' => '修改人',
            'is_del' => '删除状态',
        ];
    }

}
